package com.fhz.module_main

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.fhz.module_main.entity.Banner
import com.gyf.immersionbar.BarHide
import com.gyf.immersionbar.ImmersionBar
import com.zhpan.bannerview.BannerViewPager

class WelcomeActivity : AppCompatActivity() {

    private lateinit var mViewPager: BannerViewPager<Banner>

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_welcome)
        //状态栏修改
        ImmersionBar.with(this)
            .fitsSystemWindows(true)
            .statusBarColor(R.color.white)
            .statusBarDarkFont(true)
            .init()
        startActivity(Intent(this,MainActivity::class.java))
//        setupViewPager()
    }

    private fun setupViewPager() {

        var bannerList = ArrayList<Banner>()

        bannerList.add(Banner("https://www.wanandroid.com/blogimgs/42da12d8-de56-4439-b40c-eab66c227a4b.png"))
        bannerList.add(Banner("https://www.wanandroid.com/blogimgs/42da12d8-de56-4439-b40c-eab66c227a4b.png"))
//        mViewPager = findViewById(R.id.banner_view)
//        mViewPager.apply {
//            adapter = SimpleAdapter()
//            setLifecycleRegistry(lifecycle)
//        }.create(bannerList)
    }
}